from flask import Flask
from flask_cors import CORS
from application.app.config import *
from application.app.models import *
from application.app.routes import api_bp, auth_bp


def create_app():
    app = Flask(__name__)
    app.config.from_object(Config)
    CORS(app)
    app.register_blueprint(api_bp, url_prefix='/api')
    app.register_blueprint(auth_bp)

    return app
